﻿/**
 * 
 * Copyright 2009, 2010 Mike Jamer [email: mikejamer@gmail.com ]
 * 
 * This File is part of Moose IRC
 * 
 * MooseIRC is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * MooseIRC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MooseIRC.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace moose.irc
{
    /// <summary>
    /// An IRC Event
    /// </summary>
    /// <remarks>
    /// It's true that this object model is really imature at this point,
    /// there is some overlap and redundancy,
    /// but gimmie a break, I'm workingm through this...
    /// 
    /// I think maybe for events, I'll just hand in a dictionary object
    /// 
    /// </remarks>
    [CLSCompliant(true)]
    public class IrcEvent
    {
        /// <summary>
        /// Event Type
        /// </summary>
        private IrcEvents event_type;

        /// <summary>
        /// Event Arguments
        /// </summary>
        private Dictionary<IrcEventArguments, object> arguments;

        /// <summary>
        /// Event Type
        /// </summary>
        public IrcEvents EventType
        {
            get
            {
                return event_type;
            }
        }

        /// <summary>
        /// Collection of arguments for Event
        /// </summary>
        public Dictionary<IrcEventArguments, object> Arguments
        {
            get
            {
                return arguments;
            }
        }

        /// <summary>
        /// Initialize Irc Event
        /// </summary>
        public IrcEvent(IrcEvents irc_event_type)
            : base()
        {
            arguments = new Dictionary<IrcEventArguments, object>();
            event_type = irc_event_type;

            return;
        }

        /// <summary>
        /// Set a new Argument
        /// </summary>
        /// <param name="argument_type">argument type to add</param>
        /// <param name="value">value of argument</param>
        public void add_argument(IrcEventArguments argument_type, object value)
        {
            arguments[argument_type] = value;

            return;
        }

        /// <summary>
        /// Remove and argument
        /// </summary>
        /// <param name="argument_type">argument to remove</param>
        public void remove_argument(IrcEventArguments argument_type)
        {
            arguments.Remove(argument_type);
            return;
        }

    }
}
